import 'dart:async';

import 'package:get/get.dart';

import '../../routes/index.dart';

class SplashLogic extends GetxController {
  Timer? timer;

  @override
  void onReady() {
    super.onReady();
    timer = Timer.periodic(const Duration(seconds: 1), (timer) {
      Get.offAllNamed(RouteKey.tab);
    });
  }

  @override
  void onClose() {
    timer?.cancel();
    super.onClose();
  }
}
